Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Objects /
Chapter 4 - Colors and Color-Related Objects / Colors and Color-Related Objects Reference
Color Profile Functions / Creating and Manipulating Color Profile Objects


GXCopyToColorProfile

You can use the GXCopyToColorProfile function to copy the contents of an existing color profile object into another or to create a new color profile object and copy the contents of an existing color profile into it.

gxColorProfile GXCopyToColorProfile(gxColorProfile target,
                                     gxColorProfile source);
target
A reference to the color profile to copy the source contents into. If you specify nil for this parameter, the GXCopyToColorProfile function creates a new color profile.
source
A reference to the color profile object whose contents you want to copy.
function result
A reference to the color profile copy.
DESCRIPTION
The GXCopyToColorProfile function either copies the contents of an existing color profile object to another or creates a new color profile object and copies the contents of an existing color profile object to it. The function copies the profile data and tag list (but not the owner count) of the color profile specified by the source parameter into the color profile specified by the target parameter. It clones, but does not copy, the tag objects in the tag list.

If you specify nil for the target parameter, GXCopyToColorProfile creates a new color profile object and copies the source properties, including the owner count and tag list, into it.

You can use the GXCopyToColorProfile function to create a copy of a color profile and then modify it without changing the original.

SPECIAL CONSIDERATIONS
If you specify nil for the target parameter and no error occurs, the GXCopyToColorProfile function creates a color profile object; you are responsible
for disposing of that object when you no longer need it.

If you specify a color profile object used by an onscreen view device as the target, this function posts a colorProfile_access_restricted warning.

ERRORS, WARNINGS, AND NOTICES
Errors 
out_of_memory 
colorProfile_is_nil 
Warnings 
colorProfile_access_restricted(debugging version)
SEE ALSO
To create a new color profile that is not a copy of an existing color profile, use the GXNewColorProfile function, described on page 4-79.

To compare two color profile objects, use the GXEqualColorProfile function, described next.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996